package com.wangshouyu.mp.offiaccount.message;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.wangshouyu.mp.message.MiniProgramMessage;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 13:47
 * @description 客服小程序消息
 */
public class KfMiniProgramMessage extends BaseKfMessage{

    /**
     * 小程序消息
     */
    @SerializedName(value = "miniprogrampage")
    @JsonProperty(value = "miniprogrampage")
    @JSONField(name = "miniprogrampage")
    private MiniProgramMessage miniProgram;

    public MiniProgramMessage getMiniProgram() {
        return miniProgram;
    }

    public void setMiniProgram(MiniProgramMessage miniProgram) {
        this.miniProgram = miniProgram;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        KfMiniProgramMessage that = (KfMiniProgramMessage) o;
        return Objects.equals(miniProgram, that.miniProgram);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), miniProgram);
    }

    @Override
    public String toString() {
        return "KfMiniProgramMessage{" +
                "miniProgram=" + miniProgram +
                '}';
    }
}
